﻿<%@ Page Title="" Language="C#" MasterPageFile="~/front/MasterPage.master" AutoEventWireup="true" CodeFile="Show.aspx.cs" Inherits="front_Show" ValidateRequest="false" %>
<%@ MasterType VirtualPath="~/front/MasterPage.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="Server">
    <div class="container">
        <div class="content">
            <div class="single-page">
                <div class="print-main">
                    <asp:DataList ID="DataList1" runat="server">
                        <ItemTemplate>
                            <h3><%# Eval("column_name") %></h3>
                            <a href=<%# "/front/Show.aspx?id="+Eval("id") %>><%# Eval("title") %></a>
                            <p class="sub_head">责编 <b><%# Eval("writer") %></b> 来源 <%# Eval("source") %> 在 <%# Eval("created_at") %> </p>
                            <%# Eval("contents") %>
                        </ItemTemplate>
                    </asp:DataList>
                </div>

            </div>
            <div class="col-md-7 single-content-left">
                <div class="single">
                    <div class="leave">
                        <h4>留下评论</h4>
                    </div>
                    <div id="commentform">
                        <p class="comment-form-url">
                            <label for="url"><img src="<%= Master.ProfileArr[4] %>" class="img-circle" width="32" alt="User Image"> <%= Master.ProfileArr[1] %></label>
                        </p>
                        <p class="comment-form-comment">
                            <label for="comment">评论</label>
                            <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="评论不能为空" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
                        </p>
                        <div class="clearfix"></div>
                        <p class="form-submit">
                            <asp:Button ID="Button1" runat="server" Text="提交" OnClick="Create_Comment" />
                        </p>
                        <div class="clearfix"></div>
                    </div>
                    <div class="comments1">
                        <h4>历史评论</h4>
                        <asp:DataList ID="DataList4" runat="server">
                            <ItemTemplate>
                                <div class="comments-main">
                                    <div class="col-md-3 cmts-main-left">
                                        <img src="<%# Eval("user_img") %>" alt="">
                                    </div>
                                    <div class="col-md-9 cmts-main-right">
                                        <h5><%# Eval("name") %></h5>
                                        <p><%# Eval("comments") %></p>
                                        <div class="cmts">
                                            <div class="col-md-6 cmnts-left">
                                                <p><%# Eval("created_at") %></p>
                                            </div>
                                            <div class="col-md-6 cmnts-right">
                                                <a style="cursor:pointer" onclick="reply('<%# Eval("name") %>')">回复</a>
                                            </div>
                                            <div class="clearfix"></div>
                                        </div>
                                    </div>
                                    <div class="clearfix"></div>
                                </div>
                            </ItemTemplate>
                        </asp:DataList>
                        
                    </div>
                </div>
            </div>
            <div class="col-md-5 content-right content-right-top">
                <h5 class="head">人工智能</h5>
                <asp:DataList ID="DataList2" runat="server">
                    <ItemTemplate>
                            <a href=<%# "/front/Show.aspx?id="+Eval("id") %>>
                            <div class="editor text-center">
                                <h3><%# Eval("title") %></h3>
                                <p><%# Eval("source") %> </p>
                                <label><%# Eval("created_at") %></label>
                                <span></span>
                            </div>
                        </a>
                    </ItemTemplate>
                </asp:DataList>
                <h5 class="head">虚拟现实</h5>
                <asp:DataList ID="DataList3" runat="server">
                    <ItemTemplate>
                            <a href=<%# "/front/Show.aspx?id="+Eval("id") %>>
                            <div class="editor text-center">
                                <h3><%# Eval("title") %></h3>
                                <p><%# Eval("source") %> </p>
                                <label><%# Eval("created_at") %></label>
                                <span></span>
                            </div>
                        </a>
                    </ItemTemplate>
                </asp:DataList>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="js" runat="Server">
    <script>
        function reply(name) {
            var html = '<a href="#' + name + '">@' + name + '</a>';
            $("#main_TextBox1").text(html);
        }
    </script>
</asp:Content>

